<?php
/**
 * 教学实践
 * @author LXF
 * @date 2018.8.23
 */
namespace App\Http\Controllers\Crm;

use App\Http\Controllers\BaseController;
use App\Servers\Ajax;
use Illuminate\Http\Request;
use App\Model\Crm\TeachPracticeModel;

class TeachPracticeController extends BaseController {
    
    public function Practicelist(){
        $listinfo = TeachPracticeModel::listPractice();
        dd($listinfo);
    }
    /***
     *添加教学实践 
     * lxf
     ***/
    public function add(Request $request) {
       // $a = $request->all();dd($a);exit;
        $user_id = addslashes($request->get('user_id'));
        $year   = addslashes($request->get('year'));
        $data = [
            'user_id' => 1,
            'activity_name' => '2018',
            'activity_site' => '第一学期',
            'activity_time' => time(),
            'activity_content'=> '发的说法是否打三分大赛',
            'active_experience'=>'教学目标发放',
            'creat_at' => time(),
            'update_at' => time()
        ];
       
       $a  = TeachPracticeModel::addPractice($data);
       echo $a;
       
    }
     /***
     *修改教学实践 
     * lxf
     ***/
    public function update() {
        $where['user_id'] =1;
        $data['update_at'] = time(s);        
        $res= TeachPracticeModel::updatePractice($where,$data);
        echo $res;
    }
     /***
     *修改教学实践 
     * lxf
     ***/
    public function del() {
        $where['id'] =1;
        $data ['is_del'] =1;
        $res= TeachPracticeModel::updatePractice($where,$data);
        echo $res;
    }
}
